package edu.nf.llmtest.model.document;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @ Author bin
 * @ Create  2025/10/27 下午8:00
 **/
@Document(indexName = "llm_user", createIndex = false)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserDoc {
    /**
     * 用户id自增
     * */
    @Field(type = FieldType.Keyword)
    private  Integer userId;
    /**
     * 用户名
     * */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private  String userName;
    /**
     * 密码
     * */
    @Field(type = FieldType.Keyword)
    private String password;
    /**
     * 性别
     * */
    @Field(type = FieldType.Keyword)
    private String sex;
    /**
     * 邮箱
     * */
    @Id
    private String email;

    /**
     * 头像
     * */
    @Field(type = FieldType.Keyword)
    private String avatar;

    /**
     * 创建时间
     * */
    @Field(type = FieldType.Keyword)
    private String createTime;
    /**
     * 最后登录时间
     * */
    @Field(type = FieldType.Keyword)
    private  String lastLoginTime;
}
